#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
/*
int main()
{
	int arr[5] = { 0 };
	for (int i = 0;i < 5;i++)
	{
		scanf("%d", &arr[i]);
	}
	int count = 0;
	int j = 0;
	for (int i = 0;i < 5;i++)
	{
		count += arr[i] % 3;
		arr[i] /= 3;
		if (i == 0)
		{
			arr[1] += arr[0];
			arr[4] += arr[0];
		}
		else if (i == 4)
		{
			arr[0] += arr[4];
			arr[3] += arr[4];
		}
		else
		{
			arr[i + 1] += arr[i];
			arr[i - 1] += arr[i];
		}
	}
	for (int j = 0;j < 5;j++)
	{
		printf("%d ",arr[j]);
	}
	printf("\n%d", count);
	return 0;
}
*/
/*
#include<stdio.h>
#include<math.h>
int main()
{
	long long n;
	scanf("%lld", &n);
	int count = 1;
	for (int i = 3;i <= n;i += 2)
	{
		int flag = 1;
		for (int j = 2;j <= sqrt(i);j++)
		{
			if (i % j == 0)
			{
				flag = 0;
				break;
			}
		}
		if (flag)
		{
			count++;
		}
	}
	printf("%d", count);
	return 0;
}
*/
/*
#include<math.h>
int Is_prime(int n)
{
	int t = n;
	int m = 0;
	while (t != 0)
	{
		m = m * 10 + t % 10;
		t /= 10;
	}
	if (n == m)
		return 1;
	else
		return 0;
}
int main()
{
	int n;
	int count = 0;
	scanf("%d", &n);
	for (int i = 11;i <= n;i += 2)
	{
		int flag = 1;
		for (int j = 2;j <= sqrt(i);j++)
		{
			if (i % j == 0)
			{
				flag = 0;
				break;
			}
		}
		if (flag)
		{
			int sz=Is_prime(i);
			if (sz)
			{
				count++;
			}
		}
	}
	printf("%d", count);
	return 0;
}*/
#include<math.h>
#include<stdio.h>
double f(double x, long long n)
{
	if (n == 1)
		return sqrt(1 + x);
	else
		return sqrt(n + f(x, n - 1));
}
int main()
{
	double x = 0.0;
	long long n = 0;
	scanf("%lf%lld", &x, &n);
	printf("%.2lf", f(x, n));
	return 0;
}